﻿<fluent:RibbonWindow x:Class="PentaBiz.Studio.Application.Shell"
                     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                     xmlns:application="clr-namespace:PentaBiz.Studio.Application"
                     xmlns:fluent="clr-namespace:Fluent;assembly=Fluent" 
                     xmlns:system="clr-namespace:System;assembly=mscorlib"
                     xmlns:avalonDock="http://avalondock.codeplex.com"
                     xmlns:models="clr-namespace:PentaBiz.Studio.Services.Plugins.Models;assembly=PentaBiz.Studio.Services"

                     Title="{Binding Title}" Height="600" Width="800" x:Name="ShellWindow"
                     Closing="Shell_OnClosing"
                     Loaded="Shell_OnLoaded"
                     >
    <Window.DataContext>
        <application:ShellViewModel  />
    </Window.DataContext>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <fluent:Ribbon  x:Name="ribbon" >

            <fluent:Ribbon.ContextualGroups>
                <fluent:RibbonContextualTabGroup x:Name="TabGroup1" BorderBrush="Magenta" Background="Purple"
                                                 Header="First" Visibility="Visible" />

                <fluent:RibbonContextualTabGroup x:Name="TabGroup2" BorderBrush="Green" Background="Lime"
                                                 Header="Second" Visibility="Visible" />

                <fluent:RibbonContextualTabGroup x:Name="InvisibleTabGroup" BorderBrush="Green" Background="Red"
                                                 Header="MUST BE HIDDEN" Visibility="Visible" />
            </fluent:Ribbon.ContextualGroups>

            <fluent:Ribbon.Menu>
                <fluent:Backstage Background="{DynamicResource NormalBrush}" x:Name="RibbonBackstage">
                    <fluent:BackstageTabControl>
                        <fluent:Button Header="Save" Icon="Resources\Images\Save.png" fluent:KeyTip.Keys="S" />
                        <fluent:Button Header="Save As" Icon="Resources\Images\Save.png" fluent:KeyTip.Keys="A" />
                        <fluent:BackstageTabItem Header="TEST" Content="Hello">

                            <fluent:BackstageTabItem.ContentTemplate>

                                <DataTemplate>

                                    <Grid>
                                        <TextBox Text="{Binding Mode=OneWay}" />
                                    </Grid>
                                </DataTemplate>

                            </fluent:BackstageTabItem.ContentTemplate>

                        </fluent:BackstageTabItem>

                        <fluent:SeparatorTabItem Header="Separator" />

                        <fluent:BackstageTabItem Header="Info" fluent:KeyTip.Keys="E" IsEnabled="False">
                            <ScrollViewer>
                                <Grid Height="400" Background="Red">
                                    <ListBox Width="100" Height="100" VerticalAlignment="Top"
                                             HorizontalAlignment="Left">
                                        <ListBoxItem>1</ListBoxItem>
                                        <ListBoxItem>2</ListBoxItem>
                                        <ListBoxItem>3</ListBoxItem>
                                        <ListBoxItem>4</ListBoxItem>
                                        <ListBoxItem>5</ListBoxItem>
                                        <ListBoxItem>6</ListBoxItem>
                                        <ListBoxItem>7</ListBoxItem>
                                        <ListBoxItem>8</ListBoxItem>
                                        <ListBoxItem>9</ListBoxItem>
                                        <ListBoxItem>10</ListBoxItem>
                                    </ListBox>
                                    <fluent:ComboBox SelectedIndex="1">
                                        <ComboBoxItem>1</ComboBoxItem>
                                        <ComboBoxItem>2</ComboBoxItem>
                                        <ComboBoxItem>3</ComboBoxItem>
                                        <ComboBoxItem>4</ComboBoxItem>
                                        <ComboBoxItem>5</ComboBoxItem>
                                    </fluent:ComboBox>
                                </Grid>
                            </ScrollViewer>
                        </fluent:BackstageTabItem>

                        <fluent:BackstageTabItem Header="Recent" fluent:KeyTip.Keys="R">
                            <TabControl Margin="20,5,20,5" Style="{DynamicResource InnerBackstageTabControlStyle}">
                                <fluent:SeparatorTabItem Header="Test1" />
                                <TabItem Header="1">
                                </TabItem>
                                <TabItem Header="2">
                                </TabItem>
                                <TabItem Header="3">
                                </TabItem>
                                <fluent:SeparatorTabItem Header="Test2" />
                                <TabItem Header="4">
                                </TabItem>
                            </TabControl>
                        </fluent:BackstageTabItem>

                        <fluent:SeparatorTabItem />
                        <fluent:BackstageTabItem Header="Package Manager">
                            <TabControl Margin="20,5,20,5" Style="{DynamicResource InnerBackstageTabControlStyle}">
                                <fluent:SeparatorTabItem Header="Installed packages" />
                                <TabItem Header="Core">
                                    <Grid Background="Transparent">
                                        <Label>Core v 1.0.2</Label>
                                        <TreeView>
                                            <TreeView.Items>
                                                <TreeViewItem Header="Wpf Dynamic UI" />
                                            </TreeView.Items>
                                        </TreeView>
                                        <StackPanel HorizontalAlignment="Right" VerticalAlignment="Bottom">
                                            <fluent:Button>Update</fluent:Button>
                                            <fluent:Button>Uninstall</fluent:Button>
                                        </StackPanel>

                                    </Grid>
                                </TabItem>
                                <TabItem Header="Wpf Dynamic UI">
                                    <Grid Background="Transparent">
                                        <Label>WpfDynamicUI v2.0</Label>
                                        <TreeView>
                                            <TreeView.Items>
                                                <TreeViewItem Header="Wpf Dynamic UI" />
                                            </TreeView.Items>
                                        </TreeView>
                                        <StackPanel HorizontalAlignment="Right" VerticalAlignment="Bottom">
                                            <fluent:Button>Update</fluent:Button>
                                            <fluent:Button>Uninstall</fluent:Button>
                                        </StackPanel>
                                    </Grid>
                                </TabItem>
                                <TabItem Header="Cloud">
                                    <Grid>
                                        <Label>Cloud v 1.0.2</Label>
                                    </Grid>
                                </TabItem>
                                <TabItem Header="3">
                                    <ContentControl>
                                        <Label>3 v 1.0.2</Label>
                                    </ContentControl>
                                </TabItem>
                                <fluent:SeparatorTabItem Header="All packages" />
                                <TabItem Header="4">
                                    <ContentControl>
                                        <Label>X v 2.0.2</Label>
                                    </ContentControl>
                                </TabItem>
                            </TabControl>
                        </fluent:BackstageTabItem>
                        <fluent:BackstageTabItem Header="New" fluent:KeyTip.Keys="N">
                            <Grid Background="#550000FF" Opacity="1" Margin="50" MinWidth="0" Width="Auto"
                                  HorizontalAlignment="Stretch">
                                <TextBlock HorizontalAlignment="Left" MinWidth="0" TextWrapping="Wrap"
                                           Foreground="Black">
                                    This is long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long text
                                </TextBlock>
                                <fluent:Button IsDefinitive="True" IsEnabled="True"
                                               Style="{DynamicResource ButtonBackstageStyle}" HorizontalAlignment="Left" Icon="Resources\Images\Paste.png"
                                               LargeIcon="Resources\Images\PasteLarge.png">123</fluent:Button>
                                <fluent:DropDownButton Header="123" HorizontalAlignment="Right"
                                                       Icon="Resources\Images\Paste.png" LargeIcon="Resources\Images\PasteLarge.png"></fluent:DropDownButton>
                                <fluent:ComboBox VerticalAlignment="Bottom">
                                    <TextBlock Text="1" />
                                    <TextBlock Text="2" />
                                    <TextBlock Text="3" />
                                    <TextBlock Text="4" />
                                    <TextBlock Text="5" />
                                </fluent:ComboBox>
                                <fluent:Spinner Value="1" Format="0" InputWidth="50" Header="Lala"
                                                HorizontalAlignment="Right" VerticalAlignment="Bottom"></fluent:Spinner>
                            </Grid>
                        </fluent:BackstageTabItem>
                        <fluent:BackstageTabItem Header="Print" fluent:KeyTip.Keys="P">
                            <Grid Background="Yellow" Opacity="0.3" Margin="50" />
                        </fluent:BackstageTabItem>
                        <fluent:SeparatorTabItem />
                        <fluent:Button Header="Exit" Icon="Resources\Images\Exit.png" fluent:KeyTip.Keys="X"
                                       Command="{Binding ExitCommand}" />
                    </fluent:BackstageTabControl>
                </fluent:Backstage>
            </fluent:Ribbon.Menu>

            <fluent:Ribbon.ToolBarItems>
                <fluent:Button Size="Small" Icon="Resources\Images\Help.png">
                    <fluent:Button.ToolTip>
                        <fluent:ScreenTip Title="Insert Chart"
                                          Text="Insert a chart to illustarate and compare data. &#xa;&#xa;Bar, Pie, Line, Area and Surface are same of the available types."
                                          Image="pack://application:,,,/PentaBiz.Studio.Application;component\Resources\Images\SampleImageForScreenTip.png"
                                          HelpTopic="http:\\fluent.codeplex.com" DisableReason="Disable reason reason." Width="190" IsRibbonAligned="True" />
                    </fluent:Button.ToolTip>
                </fluent:Button>
            </fluent:Ribbon.ToolBarItems>

            <fluent:Ribbon.QuickAccessItems>
                <fluent:QuickAccessMenuItem Target="{Binding ElementName=pasteButton}" IsChecked="True" />
                <fluent:QuickAccessMenuItem Target="{Binding ElementName=cutButton}" IsChecked="True" />
                <fluent:QuickAccessMenuItem Target="{Binding ElementName=copyButton}" />
            </fluent:Ribbon.QuickAccessItems>


            <fluent:RibbonTabItem x:Name="homeTabItem" Header="Home" fluent:KeyTip.Keys="H" ToolTip="Regular Tool Tip"
                ReduceOrder=""
                                  >


                <fluent:RibbonGroupBox Header="Plugins" Name="PluginManager" >
                    <fluent:InRibbonGallery Header="Plugins" 
                                            ItemsSource="{Binding PluginManager.PluginControlTypes}"
                                            Size="Large" MinItemsInRow="4"
                                            GroupBy="PluginAssemblyName"
                                            >
                        <fluent:InRibbonGallery.ItemTemplate>
                            <DataTemplate DataType="{x:Type models:PluginControlModel}">
                                <Border>
                                    <fluent:Button
                                        Command="{Binding DataContext.PluginManager.LoadPluginControlCommand, ElementName=ShellWindow, Mode=OneWay}"
                                        CommandParameter="{Binding}" 
                                        Header="{Binding PluginTypeName}" />
                                </Border>
                            </DataTemplate>
                        </fluent:InRibbonGallery.ItemTemplate>
                    </fluent:InRibbonGallery>
                </fluent:RibbonGroupBox>
                <fluent:RibbonGroupBox Header="Services" >
                    <fluent:InRibbonGallery Header="Plugins" 
                                            ItemsSource="{Binding PluginManager.PluginServiceModels}"
                                            Size="Large" MinItemsInRow="4"
                                            >
                        <fluent:InRibbonGallery.ItemTemplate>
                            <DataTemplate DataType="{x:Type models:PluginServiceModel}">
                                <Border>
                                    <StackPanel>
                                        <TextBox Text="{Binding Title, Mode=OneWay}"/>
                                        <fluent:Button Header="Start" Command="{Binding StartServiceCommand}"/>
                                        <fluent:Button Header="Stop" Command="{Binding StopServiceCommand}"/>
                                        <fluent:Button Header="Restart" Command="{Binding RestartServiceCommand}"/>
                                    </StackPanel>
                                </Border>
                            </DataTemplate>
                        </fluent:InRibbonGallery.ItemTemplate>
                    </fluent:InRibbonGallery>
                </fluent:RibbonGroupBox>
                <fluent:RibbonGroupBox
                    Icon="pack://application:,,,/PentaBiz.Studio.Application;component/Resources/Images/Default.png" 
                    
                     Header="Themes" IsLauncherVisible="False">
                    <fluent:Button Icon="{Binding ThemeManager.SilverTheme.IconSource}"
                                   CommandParameter="{Binding ThemeManager.SilverTheme, Mode=OneWay}"
                                   Command="{Binding ThemeManager.SelectThemeCommand, Mode=OneWay}" SizeDefinition="Middle">
                        Silver
                    </fluent:Button>
                    <fluent:Button Icon="{Binding ThemeManager.BlackTheme.IconSource}"
                                   CommandParameter="{Binding ThemeManager.BlackTheme}" Command="{Binding ThemeManager.SelectThemeCommand}"
                                   SizeDefinition="Middle">Black</fluent:Button>
                    <fluent:Button Icon="{Binding ThemeManager.BlueTheme.IconSource}"
                                   CommandParameter="{Binding ThemeManager.BlueTheme}" Command="{Binding ThemeManager.SelectThemeCommand}"
                                   SizeDefinition="Middle">Blue</fluent:Button>
                </fluent:RibbonGroupBox>
            </fluent:RibbonTabItem>
            <!--</Fluent:RibbonGroupBox>
                <Fluent:RibbonGroupBox
                    Icon="pack://application:,,,/PentaBiz.Studio.Application;component/Resources/Images/Default.png" Fluent:KeyTip.Keys="C"
                    x:Name="Clipboard" Header="Clipboard" IsLauncherVisible="True" LauncherKeys="ZB">
                    <Fluent:SplitButton x:Name="pasteButton" Fluent:KeyTip.Keys="V" Header="Paste"
                                        Icon="Resources\Images\Paste.png" LargeIcon="Resources\Images\PasteLarge.png" SizeDefinition="Large" Command="Paste">
                        <Fluent:SplitButton.ToolTip>
                            <Fluent:ScreenTip Title="Paste (Ctrl+V)" Text="Paste the contents of the Clipboard."
                                              Width="190" />
                        </Fluent:SplitButton.ToolTip>
                        <Fluent:Gallery ScrollViewer.VerticalScrollBarVisibility="Hidden" Orientation="Horizontal"
                                        GroupBy="Tag" Selectable="False" ItemWidth="32" ItemHeight="32">
                            <Fluent:Gallery.ItemContainerStyle>
                                <Style TargetType="{x:Type Fluent:GalleryItem}"
                                       BasedOn="{StaticResource {x:Type Fluent:GalleryItem}}">
                                    <Setter Property="Fluent:GalleryItem.Command" Value="Paste" />
                                </Style>
                            </Fluent:Gallery.ItemContainerStyle>
                            <Image Source="Resources\Images\PasteImage.png" Width="24" Height="24"
                                   Fluent:KeyTip.Keys="K" Tag="Paste Options:" />
                            <Image Source="Resources\Images\PasteText.png" Width="24" Height="24"
                                   Fluent:KeyTip.Keys="M" Tag="Paste Options:" />
                            <Image Source="Resources\Images\PasteTextOnly.png" Width="24" Height="24"
                                   Fluent:KeyTip.Keys="T" Tag="Paste Options:" />
                            <Image Source="Resources\Images\PasteFormating.png" Width="24" Height="24"
                                   Fluent:KeyTip.Keys="L" Tag="Paste Options:" />
                            <Image Source="Resources\Images\PasteSourceFormating.png" Width="24" Height="24"
                                   Fluent:KeyTip.Keys="E" Tag="Paste Options:" />
                        </Fluent:Gallery>
                        <Fluent:MenuItem Header="Paste Special..." Fluent:KeyTip.Keys="S">
                            <Fluent:MenuItem.ToolTip>
                                <Fluent:ScreenTip Title="Paste Special" Text="This ScreenTip is attached to menu item" />
                            </Fluent:MenuItem.ToolTip>
                        </Fluent:MenuItem>
                        <Separator />
                        <Fluent:MenuItem Header="Set Default Paste..." Fluent:KeyTip.Keys="A" IsSplited="True"
                                         Command="Paste">
                            <Fluent:MenuItem Header="1"></Fluent:MenuItem>
                            <Fluent:MenuItem Header="2" Command="Paste"></Fluent:MenuItem>
                        </Fluent:MenuItem>
                        <Fluent:MenuItem Header="Paste now" Command="Paste"></Fluent:MenuItem>
                    </Fluent:SplitButton>
                    <Fluent:Button x:Name="cutButton" Fluent:KeyTip.Keys="X" Header="Cut"
                                   Icon="Resources\Images\Cut.png" SizeDefinition="Middle,Small" Command="Cut">
                        <Fluent:Button.ToolTip>
                            <Fluent:ScreenTip Title="Cut (Ctrl+X)" Text="Cut the contents to the Clipboard."
                                              DisableReason="Cut is currently not available." Width="190" />
                        </Fluent:Button.ToolTip>
                    </Fluent:Button>
                    <Fluent:Button x:Name="copyButton" Fluent:KeyTip.Keys="C" Header="Copy"
                                   Icon="Resources\Images\Copy.png" SizeDefinition="Middle,Small" Command="Copy" />
                    <Fluent:Button Fluent:KeyTip.Keys="FP" Header="Format Painter"
                                   Icon="Resources\Images\FormatPainter.png" SizeDefinition="Middle,Small" />
                    <Fluent:DropDownButton Name="buttonWatermark" Header="Watermark"
                                           Icon="Resources\Images\watermark32.png" LargeIcon="Resources\Images\watermark32.png" IsEnabled="True"
                                           VerticalAlignment="Top">
                        <Fluent:Gallery SelectedFilter="{Binding ElementName=galleryFilterAll3}" GroupBy="Tag"
                                        x:Name="WatermarkGallery" MinItemsInRow="1" MaxItemsInRow="3" Orientation="Horizontal" ItemWidth="100" ItemHeight="100">

                            <Fluent:Gallery.Filters>
                                <Fluent:GalleryGroupFilter Title="All" Groups="Confidential,Disclaimers,Urgent"
                                                           x:Name="galleryFilterAll3" />
                                <Fluent:GalleryGroupFilter Title="Confidential" Groups="Confidential" />
                                <Fluent:GalleryGroupFilter Title="Disclaimers" Groups="Disclaimers" />
                                <Fluent:GalleryGroupFilter Title="Urgent" Groups="Urgent" />
                            </Fluent:Gallery.Filters>

                           
                            <Border Tag="Confidential" BorderThickness="4" BorderBrush="Transparent">
                                <StackPanel>
                                    <Image VerticalAlignment="Top" Source="Resources\Images\ribbon.png" Stretch="None" />
                                    <TextBlock Text="CONFIDENTIAL 1" VerticalAlignment="Bottom"
                                               HorizontalAlignment="Center" />
                                </StackPanel>
                            </Border>
                            <Border Tag="Confidential" BorderThickness="4" BorderBrush="Transparent">
                                <StackPanel>
                                    <Image VerticalAlignment="Top" Source="Resources\Images\ribbon.png" Stretch="None" />
                                    <TextBlock Text="CONFIDENTIAL 2" VerticalAlignment="Bottom"
                                               HorizontalAlignment="Center" />
                                </StackPanel>
                            </Border>
                            <Border Tag="Confidential" BorderThickness="4" BorderBrush="Transparent">
                                <StackPanel>
                                    <Image VerticalAlignment="Top" Source="Resources\Images\ribbon.png" Stretch="None" />
                                    <TextBlock Text="DO NOT COPY 1" VerticalAlignment="Bottom"
                                               HorizontalAlignment="Center" />
                                </StackPanel>
                            </Border>
                            <Border Tag="Confidential" BorderThickness="4" BorderBrush="Transparent">
                                <StackPanel>
                                    <Image VerticalAlignment="Top" Source="Resources\Images\ribbon.png" Stretch="None" />
                                    <TextBlock Text="DO NOT COPY 2" VerticalAlignment="Bottom"
                                               HorizontalAlignment="Center" />
                                </StackPanel>
                            </Border>

                           
                            <Border Tag="Disclaimers" x:Name="Disclaimers" BorderThickness="4"
                                    BorderBrush="Transparent">
                                <StackPanel>
                                    <Image VerticalAlignment="Top" Source="Resources\Images\ribbon.png" Stretch="None" />
                                    <TextBlock Text="DRAFT 1" VerticalAlignment="Bottom" HorizontalAlignment="Center" />
                                </StackPanel>
                            </Border>
                            <Border Tag="Disclaimers" BorderThickness="4" BorderBrush="Transparent">
                                <StackPanel>
                                    <Image VerticalAlignment="Top" Source="Resources\Images\ribbon.png" Stretch="None" />
                                    <TextBlock Text="DRAFT 2" VerticalAlignment="Bottom" HorizontalAlignment="Center" />
                                </StackPanel>
                            </Border>
                            <Border Tag="Disclaimers" BorderThickness="4" BorderBrush="Transparent">
                                <StackPanel>
                                    <Image VerticalAlignment="Top" Source="Resources\Images\ribbon.png" Stretch="None" />
                                    <TextBlock Text="SAMPLE 1" VerticalAlignment="Bottom" HorizontalAlignment="Center" />
                                </StackPanel>
                            </Border>
                            <Border Tag="Disclaimers" BorderThickness="4" BorderBrush="Transparent">
                                <StackPanel>
                                    <Image VerticalAlignment="Top" Source="Resources\Images\ribbon.png" Stretch="None" />
                                    <TextBlock Text="SAMPLE 2" VerticalAlignment="Bottom" HorizontalAlignment="Center" />
                                </StackPanel>
                            </Border>

                           
                            <Border Tag="Urgent" x:Name="Urgent" BorderThickness="4" BorderBrush="Transparent">
                                <StackPanel>
                                    <Image VerticalAlignment="Top" Source="Resources\Images\ribbon.png" Stretch="None" />
                                    <TextBlock Text="ASAP 1" VerticalAlignment="Bottom" HorizontalAlignment="Center" />
                                </StackPanel>
                            </Border>
                            <Border Tag="Urgent" BorderThickness="4" BorderBrush="Transparent">
                                <StackPanel>
                                    <Image VerticalAlignment="Top" Source="Resources\Images\ribbon.png" Stretch="None" />
                                    <TextBlock Text="ASAP 2" VerticalAlignment="Bottom" HorizontalAlignment="Center" />
                                </StackPanel>
                            </Border>
                            <Border Tag="Urgent" BorderThickness="4" BorderBrush="Transparent">
                                <StackPanel>
                                    <Image VerticalAlignment="Top" Source="Resources\Images\ribbon.png" Stretch="None" />
                                    <TextBlock Text="URGENT 1" VerticalAlignment="Bottom" HorizontalAlignment="Center" />
                                </StackPanel>
                            </Border>
                            <Border Tag="Urgent" BorderThickness="4" BorderBrush="Transparent">
                                <StackPanel>
                                    <Image VerticalAlignment="Top" Source="Resources\Images\ribbon.png" Stretch="None" />
                                    <TextBlock Text="URGENT 2" VerticalAlignment="Bottom" HorizontalAlignment="Center" />
                                </StackPanel>
                            </Border>
                        </Fluent:Gallery>

                       
                        <Fluent:MenuItem Name="buttonRemoveWatermark" Header="Remove Watermark"
                                         Icon="Resources\Images\removeWatermark16.png" Size="Middle" IsEnabled="True" />
                    </Fluent:DropDownButton>

                </Fluent:RibbonGroupBox>
                <Fluent:RibbonGroupBox Fluent:KeyTip.Keys="ZF" x:Name="Font" Header="Font" IsLauncherVisible="True"
                                       Icon="pack://application:,,,/PentaBiz.Studio.Application;component/Resources/Images/FontColor.png"
                                       LauncherIcon="/Images/FontColor.png" LauncherKeys="NF">
                    <Fluent:RibbonToolBar>

                      
                        <Fluent:RibbonToolBar.LayoutDefinitions>
                            <Fluent:RibbonToolBarLayoutDefinition Size="Large">
                                <Fluent:RibbonToolBarRow>
                                    <Fluent:RibbonToolBarControlDefinition Target="comboBoxFontName" Width="75" />
                                    <Fluent:RibbonToolBarControlDefinition Target="comboBoxFontSize" Width="45" />
                                    <Fluent:RibbonToolBarControlGroupDefinition>
                                        <Fluent:RibbonToolBarControlDefinition Target="buttonGrowFont" />
                                        <Fluent:RibbonToolBarControlDefinition Target="buttonShrinkFont" />
                                    </Fluent:RibbonToolBarControlGroupDefinition>
                                    <Fluent:RibbonToolBarControlGroupDefinition>
                                        <Fluent:RibbonToolBarControlDefinition Target="buttonChangeCase" />
                                    </Fluent:RibbonToolBarControlGroupDefinition>
                                    <Fluent:RibbonToolBarControlGroupDefinition>
                                        <Fluent:RibbonToolBarControlDefinition Target="buttonClearFormatting" />
                                    </Fluent:RibbonToolBarControlGroupDefinition>
                                </Fluent:RibbonToolBarRow>
                                <Fluent:RibbonToolBarRow>
                                    <Fluent:RibbonToolBarControlGroupDefinition>
                                        <Fluent:RibbonToolBarControlDefinition Target="buttonBold" />
                                        <Fluent:RibbonToolBarControlDefinition Target="buttonItalic" />
                                        <Fluent:RibbonToolBarControlDefinition Target="buttonUnderline" />
                                        <Fluent:RibbonToolBarControlDefinition Target="buttonStrikethrough" />
                                        <Fluent:RibbonToolBarControlDefinition Target="buttonSubscript" />
                                        <Fluent:RibbonToolBarControlDefinition Target="buttonSuperscript" />
                                    </Fluent:RibbonToolBarControlGroupDefinition>
                                    <Fluent:RibbonToolBarControlGroupDefinition>
                                        <Fluent:RibbonToolBarControlDefinition Target="buttonTextEffects" />
                                        <Fluent:RibbonToolBarControlDefinition Target="buttonTextHighlightColor" />
                                        <Fluent:RibbonToolBarControlDefinition Target="buttonFontColor" />
                                    </Fluent:RibbonToolBarControlGroupDefinition>
                                </Fluent:RibbonToolBarRow>
                            </Fluent:RibbonToolBarLayoutDefinition>

                            <Fluent:RibbonToolBarLayoutDefinition Size="Middle">
                                <Fluent:RibbonToolBarRow>
                                    <Fluent:RibbonToolBarControlDefinition Target="comboBoxFontName" Width="125" />
                                    <Fluent:RibbonToolBarControlDefinition Target="comboBoxFontSize" Width="50" />
                                </Fluent:RibbonToolBarRow>
                                <Fluent:RibbonToolBarRow>
                                    <Fluent:RibbonToolBarControlGroupDefinition>
                                        <Fluent:RibbonToolBarControlDefinition Target="buttonBold" />
                                        <Fluent:RibbonToolBarControlDefinition Target="buttonItalic" />
                                        <Fluent:RibbonToolBarControlDefinition Target="buttonUnderline" />
                                        <Fluent:RibbonToolBarControlDefinition Target="buttonStrikethrough" />
                                        <Fluent:RibbonToolBarControlDefinition Target="buttonSubscript" />
                                        <Fluent:RibbonToolBarControlDefinition Target="buttonSuperscript" />
                                    </Fluent:RibbonToolBarControlGroupDefinition>
                                    <Fluent:RibbonToolBarControlGroupDefinition>
                                        <Fluent:RibbonToolBarControlDefinition Target="buttonClearFormatting" />
                                    </Fluent:RibbonToolBarControlGroupDefinition>
                                </Fluent:RibbonToolBarRow>
                                <Fluent:RibbonToolBarRow>
                                    <Fluent:RibbonToolBarControlGroupDefinition>
                                        <Fluent:RibbonToolBarControlDefinition Target="buttonTextEffects" />
                                        <Fluent:RibbonToolBarControlDefinition Target="buttonTextHighlightColor" />
                                        <Fluent:RibbonToolBarControlDefinition Target="buttonFontColor" />
                                        <Fluent:RibbonToolBarControlDefinition Target="buttonChangeCase" />
                                    </Fluent:RibbonToolBarControlGroupDefinition>
                                    <Fluent:RibbonToolBarControlGroupDefinition>
                                        <Fluent:RibbonToolBarControlDefinition Target="buttonGrowFont" />
                                        <Fluent:RibbonToolBarControlDefinition Target="buttonShrinkFont" />
                                    </Fluent:RibbonToolBarControlGroupDefinition>
                                </Fluent:RibbonToolBarRow>
                            </Fluent:RibbonToolBarLayoutDefinition>
                        </Fluent:RibbonToolBar.LayoutDefinitions>

                      
                        <Fluent:ComboBox x:Name="comboBoxFontName" MinWidth="40" Height="22" BorderBrush="Gainsboro"
                                         Foreground="#FF222222" GroupBy="Tag" DisplayMemberPath="Text" IsTextSearchEnabled="True" ResizeMode="Vertical"
                                         Fluent:KeyTip.Keys="FF" SizeDefinition="Small" SelectedIndex="0">
                            <TextBlock Text="Arial" Tag="Theme Fonts" />
                            <TextBlock Text="Tahoma" Tag="Theme Fonts" />
                            <TextBlock Text="Tahoma" Tag="Recent Used Fonts" />
                            <TextBlock Text="Arial" Tag="AllFonts" />
                            <TextBlock Text="Segoe UI" Tag="AllFonts" x:Name="segoeFont" />
                            <TextBlock Text="Tahoma" Tag="AllFonts" />
                            <TextBlock Text="Webdings" Tag="AllFonts" />
                            <TextBlock Text="Winding" Tag="AllFonts" />
                        </Fluent:ComboBox>
                        <Fluent:ComboBox x:Name="comboBoxFontSize" Width="49" HorizontalAlignment="Left" Height="22"
                                         SelectedIndex="1" BorderBrush="Gainsboro" Foreground="#FF222222" Text="12" DisplayMemberPath="Text" IsEditable="False"
                                         SizeDefinition="Small" ResizeMode="Vertical" Fluent:KeyTip.Keys="FS">
                            <TextBlock Text="7" />
                            <TextBlock Text="8" />
                            <TextBlock Text="9" />
                            <TextBlock Text="10" />
                            <TextBlock Text="11" />
                            <TextBlock Text="12" />
                            <TextBlock Text="14" />
                            <TextBlock Text="16" />
                            <TextBlock Text="18" />
                            <TextBlock Text="20" />
                            <TextBlock Text="22" />
                            <TextBlock Text="24" />
                            <TextBlock Text="28" />
                            <TextBlock Text="32" />
                            <TextBlock Text="36" />
                            <TextBlock Text="48" />
                            <TextBlock Text="72" />
                        </Fluent:ComboBox>
                        <Fluent:Button Fluent:KeyTip.Keys="GF" x:Name="buttonGrowFont"
                                       Icon="Resources\Images\GrowFont.png" HorizontalAlignment="Left" SizeDefinition="Small" />
                        <Fluent:Button x:Name="buttonShrinkFont" Icon="Resources\Images\ShrinkFont.png"
                                       HorizontalAlignment="Left" SizeDefinition="Small" />
                        <Fluent:DropDownButton x:Name="buttonChangeCase" Icon="Resources\Images\ChangeCase.png"
                                               HorizontalAlignment="Left" SizeDefinition="Small" />
                        <Fluent:Button x:Name="buttonClearFormatting" Icon="Resources\Images\ClearFormatting.png"
                                       HorizontalAlignment="Left" SizeDefinition="Small" />
                        <Fluent:ToggleButton Fluent:KeyTip.Keys="B" x:Name="buttonBold"
                                             Icon="Resources\Images\Bold.png" HorizontalAlignment="Left" SizeDefinition="Small" />
                        <Fluent:ToggleButton x:Name="buttonItalic" Fluent:KeyTip.Keys="I"
                                             Icon="Resources\Images\Italic.png" HorizontalAlignment="Left" SizeDefinition="Small" />
                        <Fluent:DropDownButton x:Name="buttonUnderline" Icon="Resources\Images\Underline.png"
                                               HorizontalAlignment="Left" SizeDefinition="Small" />
                        <Fluent:Button x:Name="buttonStrikethrough" Icon="Resources\Images\Strikethrough.png"
                                       HorizontalAlignment="Left" SizeDefinition="Small" />
                        <Fluent:Button x:Name="buttonSubscript" Icon="Resources\Images\Subscript.png"
                                       HorizontalAlignment="Left" SizeDefinition="Small" />
                        <Fluent:Button x:Name="buttonSuperscript" Icon="Resources\Images\Superscript.png"
                                       HorizontalAlignment="Left" SizeDefinition="Small" />
                        <Fluent:DropDownButton x:Name="buttonTextEffects" HorizontalAlignment="Left"
                                               SizeDefinition="Small">
                            <Fluent:DropDownButton.Icon>
                                <Grid>
                                    <Image Source="Resources\Images\TextEffects.png" Width="16" Height="16" />
                                    <Rectangle VerticalAlignment="Bottom" Height="2" Width="16"
                                               HorizontalAlignment="Center">
                                        <Rectangle.Fill>
                                            <SolidColorBrush
                                                Color="{Binding SelectedColor, ElementName=standardColorGallery}" />
                                        </Rectangle.Fill>
                                    </Rectangle>
                                </Grid>
                            </Fluent:DropDownButton.Icon>
                            <Fluent:ColorGallery Mode="StandardColors" x:Name="standardColorGallery"
                                                 SelectedColor="{Binding SelectedColor, ElementName=highlightColorGallery, Mode=TwoWay}" />
                        </Fluent:DropDownButton>
                        <Fluent:DropDownButton x:Name="buttonTextHighlightColor" HorizontalAlignment="Left"
                                               SizeDefinition="Small">
                            <Fluent:DropDownButton.Icon>
                                <Grid>
                                    <Image Source="Resources\Images\TextHighlightColor.png" Width="16" Height="16" />
                                    <Rectangle VerticalAlignment="Bottom" Height="4" Width="16"
                                               HorizontalAlignment="Center">
                                        <Rectangle.Fill>
                                            <SolidColorBrush
                                                Color="{Binding SelectedColor, ElementName=highlightColorGallery}" />
                                        </Rectangle.Fill>
                                    </Rectangle>
                                </Grid>
                            </Fluent:DropDownButton.Icon>
                            <Fluent:ColorGallery Mode="HighlightColors" x:Name="highlightColorGallery"
                                                 SelectedColor="Yellow" IsAutomaticColorButtonVisible="False" />
                        </Fluent:DropDownButton>
                        <Fluent:DropDownButton x:Name="buttonFontColor" HorizontalAlignment="Left"
                                               SizeDefinition="Small" MaxDropDownHeight="500">
                            <Fluent:DropDownButton.ToolTip>
                                <Fluent:ScreenTip
                                    Text="Test-ScreenTip to test wrong ToolTip appearence when Popup is open" />
                            </Fluent:DropDownButton.ToolTip>
                            <Fluent:DropDownButton.Icon>
                                <Grid>
                                    <Image Source="Resources\Images\FontColor.png" Width="16" Height="16"
                                           SnapsToDevicePixels="True" />
                                    <Rectangle VerticalAlignment="Bottom" Height="4" Width="16"
                                               HorizontalAlignment="Center">
                                        <Rectangle.Fill>
                                            <SolidColorBrush
                                                Color="{Binding SelectedColor, ElementName=themeColorGallery}" />
                                        </Rectangle.Fill>
                                    </Rectangle>
                                </Grid>
                            </Fluent:DropDownButton.Icon>
                            <Fluent:ColorGallery ThemeColorsSource="{Binding ThemeColors}" SelectedColor="Blue"
                                                 Mode="ThemeColors" StandardColorGridRows="3" Columns="10" ThemeColorGridRows="5" x:Name="themeColorGallery"
                                                 IsNoColorButtonVisible="True">
                            </Fluent:ColorGallery>

                        </Fluent:DropDownButton>
                    </Fluent:RibbonToolBar>
                </Fluent:RibbonGroupBox>
                <Fluent:RibbonGroupBox
                    Icon="pack://application:,,,/PentaBiz.Studio.Application;component/Resources/Images/Default.png" x:Name="A" Fluent:KeyTip.Keys="A"
                    Header="Galleries" IsLauncherVisible="True">
                    <Fluent:InRibbonGallery Icon="Resources\Images\Default.png"
                                            LargeIcon="Resources\Images\GalleryLarge.png" x:Name="inRibbonGallery1" Header="In-Ribbon Gallery"
                                            Fluent:KeyTip.Keys="JS" SelectedFilter="{Binding ElementName=galleryFilterAll}" ResizeMode="Both" MinItemsInRow="2"
                                            MaxItemsInRow="7" SizeDefinition="Large" Orientation="Horizontal" ItemWidth="40" ItemHeight="56" GroupBy="Tag"
                                            CanCollapseToButton="True" MinItemsInDropDownRow="4">
                        <Fluent:InRibbonGallery.Filters>
                            <Fluent:GalleryGroupFilter Title="All" Groups="Group1,Group2" x:Name="galleryFilterAll" />
                            <Fluent:GalleryGroupFilter Title="Group1 L" Groups="Group1" />
                            <Fluent:GalleryGroupFilter Title="Group2 L" Groups="Group2" />
                        </Fluent:InRibbonGallery.Filters>
                        <Border Tag="Group1" BorderThickness="1" BorderBrush="Aqua">
                            <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">1</TextBlock>
                        </Border>
                        <Border Tag="Group1" BorderThickness="1" BorderBrush="Aqua">
                            <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">2</TextBlock>
                        </Border>
                        <Border Tag="Group1" BorderThickness="1" BorderBrush="Aqua">
                            <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">3</TextBlock>
                        </Border>
                        <Border Tag="Group1" BorderThickness="1" BorderBrush="Aqua">
                            <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">4</TextBlock>
                        </Border>
                        <Border Tag="Group1" x:Name="ghh" BorderThickness="1" BorderBrush="Aqua">
                            <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">33</TextBlock>
                        </Border>
                        <Border Tag="Group2" BorderThickness="1" BorderBrush="Aqua">
                            <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">5</TextBlock>
                        </Border>
                        <Border Tag="Group2" BorderThickness="1" BorderBrush="Aqua">
                            <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">6</TextBlock>
                        </Border>
                        <Border Tag="Group2" BorderThickness="1" BorderBrush="Aqua">
                            <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">7</TextBlock>
                        </Border>

                    </Fluent:InRibbonGallery>

                    <Fluent:SplitButton Icon="Resources\Images\Default.png" LargeIcon="/Images/GalleryLarge.png"
                                        Header="Split" Fluent:KeyTip.Keys="S" ResizeMode="Both" SizeDefinition="Large" MaxDropDownHeight="1000"
                                        DropDownHeight="300">
                        <Fluent:Gallery x:Name="gallery" MinHeight="60" MinItemsInRow="2" MaxItemsInRow="6"
                                        ItemWidth="128" ItemHeight="128">
                            <Border Tag="Group1" BorderThickness="1" BorderBrush="Aqua">
                                <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">1</TextBlock>
                            </Border>
                            <Border Tag="Group1" BorderThickness="1" BorderBrush="Aqua">
                                <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">2</TextBlock>
                            </Border>
                            <Border Tag="Group1" BorderThickness="1" BorderBrush="Aqua">
                                <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">3</TextBlock>
                            </Border>
                            <Border Tag="Group2" BorderThickness="1" BorderBrush="Aqua">
                                <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">4</TextBlock>
                            </Border>
                            <Border Tag="Group2" BorderThickness="1" BorderBrush="Aqua">
                                <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">5</TextBlock>
                            </Border>
                            <Border Tag="Group2" BorderThickness="1" BorderBrush="Aqua">
                                <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">6</TextBlock>
                            </Border>
                            <Border Tag="Group2" BorderThickness="1" BorderBrush="Aqua">
                                <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">7</TextBlock>
                            </Border>
                            <Border Tag="Group3" BorderThickness="1" BorderBrush="Aqua">
                                <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">8</TextBlock>
                            </Border>
                        </Fluent:Gallery>
                        <Fluent:MenuItem Header="Item5" Fluent:KeyTip.Keys="E" Icon="Resources\Images\ChangeCase.png" />
                        <Fluent:MenuItem Header="Item5" Fluent:KeyTip.Keys="R">
                            <Fluent:MenuItem Header="Itemq" Fluent:KeyTip.Keys="A" />
                            <Fluent:MenuItem Header="Itemw" Fluent:KeyTip.Keys="B" />
                            <Fluent:MenuItem Header="Item5" Fluent:KeyTip.Keys="R"
                                             Icon="Resources\Images\ChangeCase.png">
                                <Fluent:MenuItem Header="Itemq" Fluent:KeyTip.Keys="A" MaxDropDownHeight="350">
                                    <Fluent:Gallery x:Name="galleryl" MinHeight="60" MinItemsInRow="3"
                                                    MaxItemsInRow="6" ItemWidth="28" ItemHeight="28">
                                        <Border Tag="Group1" BorderThickness="1" BorderBrush="Aqua">
                                            <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">1</TextBlock>
                                        </Border>
                                        <Border Tag="Group1" BorderThickness="1" BorderBrush="Aqua">
                                            <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">2</TextBlock>
                                        </Border>
                                        <Border Tag="Group1" BorderThickness="1" BorderBrush="Aqua">
                                            <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">3</TextBlock>
                                        </Border>
                                        <Border Tag="Group2" BorderThickness="1" BorderBrush="Aqua">
                                            <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">4</TextBlock>
                                        </Border>
                                        <Border Tag="Group2" BorderThickness="1" BorderBrush="Aqua">
                                            <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">5</TextBlock>
                                        </Border>
                                        <Border Tag="Group2" BorderThickness="1" BorderBrush="Aqua">
                                            <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">6</TextBlock>
                                        </Border>
                                        <Border Tag="Group2" BorderThickness="1" BorderBrush="Aqua">
                                            <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">7</TextBlock>
                                        </Border>
                                        <Border Tag="Group3" BorderThickness="1" BorderBrush="Aqua">
                                            <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">8</TextBlock>
                                        </Border>
                                    </Fluent:Gallery>
                                </Fluent:MenuItem>
                                <Fluent:MenuItem Header="Itemw" Fluent:KeyTip.Keys="B" />
                                <Fluent:MenuItem Header="Item5" Fluent:KeyTip.Keys="R">
                                    <Fluent:MenuItem Header="Itemq" Fluent:KeyTip.Keys="A" IsCheckable="True"
                                                     GroupName="ABC" />
                                    <Fluent:MenuItem Header="Itemw" Fluent:KeyTip.Keys="B" IsCheckable="True"
                                                     GroupName="ABC" />
                                    <Fluent:MenuItem Header="Iteme" Fluent:KeyTip.Keys="C" IsCheckable="True"
                                                     GroupName="ABC" IsChecked="True" />
                                </Fluent:MenuItem>
                            </Fluent:MenuItem>
                        </Fluent:MenuItem>
                        <Fluent:MenuItem Header="Item" />
                        <Fluent:MenuItem Header="Item" />
                        <Fluent:MenuItem Header="Item" />
                        <Fluent:MenuItem Header="Item" />
                        <Fluent:MenuItem Header="Item" />
                        <Fluent:MenuItem Header="Item" />
                        <Fluent:MenuItem Header="Item" />
                        <Fluent:MenuItem Header="Item" />
                        <Fluent:MenuItem Header="Item" />
                        <Fluent:MenuItem Header="Item" />
                        <Fluent:MenuItem Header="Item" />
                        <Fluent:MenuItem Header="Item" />
                        <Fluent:MenuItem Header="Item" />
                        <Fluent:MenuItem Header="Item" />
                    </Fluent:SplitButton>

                </Fluent:RibbonGroupBox>
                <Fluent:RibbonGroupBox
                    Icon="pack://application:,,,/PentaBiz.Studio.Application;component/Resources/Images/Default.png" Fluent:KeyTip.Keys="ZXB"
                    x:Name="B" Header="Spinners" IsLauncherVisible="True">
                    <Fluent:Spinner Fluent:KeyTip.Keys="KA" InputWidth="75" Format="0 px" Header="Left:"
                                    Icon="pack://application:,,,/Fluent;component/Themes/Office2010/Images/WarningSmall.png" IsEnabled="False" />
                    <Fluent:Spinner Fluent:KeyTip.Keys="KB" InputWidth="75" Format="0 px" Header="Right:"
                                    Icon="pack://application:,,,/Fluent;component/Themes/Office2010/Images/WarningSmall.png" />
                    <Fluent:Spinner Fluent:KeyTip.Keys="KC" InputWidth="75" Format="0 px" Header="Top:"
                                    Icon="pack://application:,,,/Fluent;component/Themes/Office2010/Images/WarningSmall.png" />

                </Fluent:RibbonGroupBox>
            </Fluent:RibbonTabItem>
                     
                <Fluent:RibbonTabItem Header="Plugin 1">
                <Fluent:RibbonGroupBox Header="Plugin 1 group" IsLauncherVisible="True">
                    <ContentControl>
                        <StackPanel Orientation="Horizontal">
                            <Fluent:Button Header="Button1" SizeDefinition="Large,Middle,Small"></Fluent:Button>
                            <Fluent:Button Header="Button2" SizeDefinition="Large,Middle,Small"></Fluent:Button>
                        </StackPanel>
                    </ContentControl>
                </Fluent:RibbonGroupBox>
                <Fluent:RibbonGroupBox Header="Plugin 2 group">
                    <ContentControl>
                        <StackPanel Orientation="Horizontal">
                            <Fluent:Button Header="Button1"></Fluent:Button>
                            <Fluent:Button Header="Button2"></Fluent:Button>
                            <Fluent:InRibbonGallery SizeDefinition="Large,Large,Large"></Fluent:InRibbonGallery>
                        </StackPanel>
                    </ContentControl>
                </Fluent:RibbonGroupBox>
            </Fluent:RibbonTabItem>
            <Fluent:RibbonTabItem Header="Plugin2"></Fluent:RibbonTabItem>
            <Fluent:RibbonTabItem x:Name="secondTab"
                                  Fluent:KeyTip.Keys="Y"
                                  Header="Insert"
                                  IsSeparatorVisible="true"
                                  ReduceOrder="groupLL, groupLL, groupLL, (groupLL),(groupLL),(groupLL),(groupLL),(groupLL)">
                <Fluent:RibbonGroupBox Fluent:KeyTip.Keys="FG"
                                       Header=""
                                       IsLauncherVisible="False"
                                       x:Name="groupLL">

                    <Fluent:ComboBox IsEditable="False"
                                     InputWidth="150"
                                     Header="Test"
                                     ItemsSource="{Binding FontsData}">
                        <Fluent:ComboBox.ItemTemplate>
                            <DataTemplate>
                                <TextBlock Text="{Binding}"
                                           FontFamily="{Binding}" />
                            </DataTemplate>
                        </Fluent:ComboBox.ItemTemplate>
                    </Fluent:ComboBox>
                    <Fluent:ComboBox IsEditable="False"
                                     InputWidth="150"
                                     Header="Test"
                                     ItemsSource="{Binding FontsData}">
                        <Fluent:ComboBox.ItemTemplate>
                            <DataTemplate>
                                <TextBlock Text="{Binding}"
                                           FontFamily="{Binding}" />
                            </DataTemplate>
                        </Fluent:ComboBox.ItemTemplate>
                    </Fluent:ComboBox>


                    <Fluent:ComboBox Name="FilterComboBox"
                                     IsReadOnly="True"
                                     Fluent:KeyTip.Keys="H"
                                     SelectedIndex="0">
                        <System:String>Show All</System:String>
                        <System:String>Read-only</System:String>
                        <System:String>Writeable</System:String>
                    </Fluent:ComboBox>
                    <Fluent:InRibbonGallery x:Name="inRibbonGallery"
                                            Icon="pack://application:,,,/Fluent;component/Themes/Office2010/Images/WarningSmall.png"
                                            Header="Split"
                                            Fluent:KeyTip.Keys="S"
                                            GroupBy="Tag"
                                            ResizeMode="Both"
                                            MaxItemsInRow="6"
                                            MinItemsInRow="2"
                                            ItemWidth="40"
                                            ItemHeight="55"
                                            MinItemsInDropDownRow="5">
                        <Fluent:InRibbonGallery.Filters>
                            <Fluent:GalleryGroupFilter Title="All"
                                                       Groups="Group1,Group2"
                                                       x:Name="galleryFilterAll2" />
                            <Fluent:GalleryGroupFilter Title="Group1"
                                                       Groups="Group1" />
                            <Fluent:GalleryGroupFilter Title="Group2"
                                                       Groups="Group2" />
                        </Fluent:InRibbonGallery.Filters>

                        <TextBlock Tag="Group1">1</TextBlock>
                        <TextBlock Tag="Group1">2</TextBlock>
                        <TextBlock Tag="Group1">3</TextBlock>
                        <TextBlock Tag="Group1">4</TextBlock>
                        <TextBlock Tag="Group1">5</TextBlock>
                        <TextBlock Tag="Group1">6</TextBlock>
                        <TextBlock Tag="Group2">1 (G 2)</TextBlock>
                        <TextBlock Tag="Group2">2 (G 2)</TextBlock>
                        <TextBlock Tag="Group2">3 (G 2)</TextBlock>
                    </Fluent:InRibbonGallery>
                    <Fluent:Button Icon="Resources\Images\GrowFont.png"
                                   LargeIcon="Resources\Images\GrowFont.png"
                                   Header="Enlarge"
                                    />
                    <Fluent:Button Icon="Resources\Images\ShrinkFont.png"
                                   LargeIcon="Resources\Images\ShrinkFont.png"
                                   Header="Reduce"
                                    />
                    <Fluent:Button Icon="Resources\Images\Box.png"
                                   LargeIcon="Resources\Images\Box.png"
                                   Header="Cmd"
                                  />
                </Fluent:RibbonGroupBox>
                <Fluent:RibbonGroupBox Header="LongLongGroup"
                                       IsLauncherVisible="False">
                    <Fluent:Button SizeDefinition="Large,Large,Large"></Fluent:Button>
                </Fluent:RibbonGroupBox>
            </Fluent:RibbonTabItem>
            <Fluent:RibbonTabItem Header="Page Layout"
                                  Fluent:KeyTip.Keys="Ü1">
                <Fluent:RibbonGroupBox Header="LongLongGroup"
                                       IsLauncherVisible="False">
                    <Fluent:CheckBox>Text 1</Fluent:CheckBox>
                    <Fluent:CheckBox>Text 2</Fluent:CheckBox>
                    <Fluent:CheckBox>Text 3</Fluent:CheckBox>
                </Fluent:RibbonGroupBox>
            </Fluent:RibbonTabItem>
            <Fluent:RibbonTabItem Header="References"
                                  Fluent:KeyTip.Keys="Ü2">
                <Fluent:RibbonGroupBox x:Name="xxx"
                                       Header="LongLongGroup"
                                       IsLauncherVisible="True"
                                       LauncherCommand="Paste"
                                       >
                    <Fluent:Button Header="Button"
                                   Icon="Resources\Images\GrowFont.png"
                                   Command="ApplicationCommands.Paste" />
                    <Fluent:Button Header="Button"
                                   Icon="Resources\Images\GrowFont.png"
                                   Command="ApplicationCommands.Paste" />
                    <Separator />
                    <Fluent:Button Header="Button"
                                   Icon="Resources\Images\GrowFont.png"
                                   Command="ApplicationCommands.Paste" />
                    <Fluent:Button Header="Button"
                                   Icon="Resources\Images\GrowFont.png"
                                   Command="ApplicationCommands.Paste" />
                    <Separator />
                    <Fluent:Button Header="Button"
                                   Icon="Resources\Images\GrowFont.png"
                                   Command="ApplicationCommands.Paste" />
                </Fluent:RibbonGroupBox>

                <Fluent:RibbonGroupBox>
                    <Fluent:ToggleButton Header="Pause"
                                         Icon="Resources\Images\GrowFont.png"
                                         SizeDefinition="Middle"
                                         GroupName="Group1" />
                    <Fluent:ToggleButton Header="Button long text ggggggg gggg"
                                         LargeIcon="Resources\Images\Test32.png"
                                         Icon="Resources\Images\Test16.png"
                                         SizeDefinition="Middle"
                                         GroupName="Group1" />
                    <Separator />
                    <Fluent:ToggleButton Header="Button long text ggggggg gggg"
                                         LargeIcon="Resources\Images\Test32.png"
                                         Icon="Resources\Images\Test16.png"
                                         GroupName="Group1" />
                    <Fluent:ToggleButton Header="Button1"
                                         GroupName="Group1" />
                    <Separator />
                    <Fluent:ToggleButton Header="Button1"
                                         GroupName="Group1" />
                </Fluent:RibbonGroupBox>

                <Fluent:RibbonGroupBox>
                    <Fluent:ToggleButton Header="Button1"
                                         GroupName="Group1" />
                    <Fluent:ToggleButton Header="Button2"
                                         GroupName="Group2" />
                </Fluent:RibbonGroupBox>

            </Fluent:RibbonTabItem>
            <Fluent:RibbonTabItem Header="Mailings"
                                  Group="{Binding ElementName=tabGroup1, Mode=OneWay}">
                <Fluent:RibbonGroupBox>
                    <Fluent:ComboBox x:Name="someCombo"
                                     ItemsSource="{Binding TstArr, ElementName=window}"
                                     InputWidth="80"
                                     SelectedItem="{Binding TST, Mode=TwoWay, ElementName=window}"
                                     IsEditable="False"></Fluent:ComboBox>
                    <Fluent:ToggleButton Header="Button1"
                                         GroupName="Group1" />
                    <Fluent:ToggleButton Header="Button1"
                                         GroupName="Group1" />
                    <Fluent:ToggleButton Header="Button1"
                                         GroupName="Group1" />
                </Fluent:RibbonGroupBox>
            </Fluent:RibbonTabItem>
            <Fluent:RibbonTabItem Header="Review">
                <Fluent:RibbonGroupBox Header="LongLongGroup"
                                       IsLauncherVisible="False">
                    <Fluent:ToggleButton Header="blah blah"
                                         SizeDefinition="Small">
                        <Fluent:ToggleButton.Icon>
                            <Grid>
                                <Image />
                                <TextBlock Text="1" />
                            </Grid>
                        </Fluent:ToggleButton.Icon>
                    </Fluent:ToggleButton>
                    <Fluent:SplitButton Header="blah blah"
                                         SizeDefinition="Small">
                        <Fluent:SplitButton.Icon>
                            <Grid>
                                <Image />
                                <TextBlock Text="1" />
                            </Grid>
                        </Fluent:SplitButton.Icon>
                    </Fluent:SplitButton>
                </Fluent:RibbonGroupBox>
            </Fluent:RibbonTabItem>
            <Fluent:RibbonTabItem Header="View">
                <Fluent:RibbonGroupBox Header="LongLongGroup"
                                       IsLauncherVisible="False">
                    <Fluent:TextBox x:Name="textBox"
                                    InputWidth="70"
                                    MaxLength="5"
                                    Icon="Resources\Images\GrowFont.png"
                                    Header="Text"
                                    Text="CurrentText" />

                    <Fluent:Button Header="PrintVisual"
                                    />
                </Fluent:RibbonGroupBox>
            </Fluent:RibbonTabItem>
            <Fluent:RibbonTabItem Header="Format"
                                  Group="{Binding ElementName=tabGroup1, Mode=OneWay}">
                <Fluent:RibbonGroupBox Header="LongLongGroup"
                                       IsLauncherVisible="False">
                </Fluent:RibbonGroupBox>
            </Fluent:RibbonTabItem>
            <Fluent:RibbonTabItem Header="Design"
                                  Group="{Binding ElementName=tabGroup2, Mode=OneWay}" />
           
            <Fluent:RibbonTabItem Header="Layout"
                                  Group="{Binding ElementName=tabGroup2, Mode=OneWay}">
                <Fluent:RibbonGroupBox Header="LongLongGroup"
                                       IsLauncherVisible="False">
                    <Fluent:Button Header="{Binding Title, ElementName=window, StringFormat='Window title: {0}'}" />
                    <DatePicker />
                </Fluent:RibbonGroupBox>
            </Fluent:RibbonTabItem>

            <Fluent:RibbonTabItem Header="MUST BE HIDDEN"
                                  Group="{Binding ElementName=invisibleTabGroup, Mode=OneWay}"
                                  Visibility="Collapsed">
                <Fluent:RibbonGroupBox Header="MUST BE HIDDEN"
                                       IsLauncherVisible="False"
                                       Visibility="Collapsed">
                </Fluent:RibbonGroupBox>
            </Fluent:RibbonTabItem>-->
        </fluent:Ribbon>
        <avalonDock:DockingManager Grid.Row="1" x:Name="DockManager" AllowMixedOrientation="True"
                                   Theme="{Binding ThemeManager.SelectedTheme.AvalonDockTheme}" 
                                   DocumentsSource="{Binding PluginManager.PluginControlModels}"
                                   ActiveContent="{Binding PluginManager.SelectedPluginControlModel}" 
                                   DocumentClosed="DockManager_OnDocumentClosed"
                                   >

            <avalonDock:DockingManager.LayoutItemTemplate>
                <DataTemplate DataType="{x:Type models:PluginControlModel}">
                    <AdornerDecorator>
                        <ContentPresenter Content="{Binding Model}" />
                    </AdornerDecorator>
                </DataTemplate>
            </avalonDock:DockingManager.LayoutItemTemplate>
            <avalonDock:DockingManager.LayoutItemContainerStyle>
                <Style TargetType="{x:Type avalonDock:LayoutItem}">
                    <Setter Property="Title" Value="{Binding Model.Title}" />
                    <!--<Setter Property="ToolTip" Value="{Binding Model.FilePath}"/>
                    <Setter Property="CloseCommand" Value="{Binding Model.CloseCommand}"/>
                    <Setter Property="IconSource" Value="{Binding Model.IconSource}"/>
                    <Setter Property="ContentId" Value="{Binding Model.ContentId}"/>-->
                </Style>
            </avalonDock:DockingManager.LayoutItemContainerStyle>
            <avalonDock:LayoutRoot>
                <avalonDock:LayoutPanel Orientation="Vertical">
                    <avalonDock:LayoutDocumentPane />
                    <!--<avalonDock:LayoutAnchorablePane Name="ToolsPane" DockHeight="150">
                    </avalonDock:LayoutAnchorablePane>-->
                </avalonDock:LayoutPanel>
            </avalonDock:LayoutRoot>
        </avalonDock:DockingManager>
        <fluent:StatusBar HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Grid.Row="2">
            <fluent:StatusBarItem Title="Words Width" Value="150" HorizontalAlignment="Left">
                <TextBlock Text="150 px" />
            </fluent:StatusBarItem>
            <Separator HorizontalAlignment="Left" />
            <fluent:StatusBarItem Title="Selected Words" Value="15" ToolTip="This is Selected Words" Content="15"
                                  HorizontalAlignment="Left" />
            <Separator HorizontalAlignment="Left" />
            <fluent:StatusBarItem Title="Zoom" HorizontalAlignment="Right"
                                  Value="{Binding Value, ElementName=zoomSlider, StringFormat={}{0:0}\%}" />
            <fluent:StatusBarItem Title="Zoom Slider" HorizontalAlignment="Right">
                <Slider x:Name="zoomSlider" Minimum="20" Maximum="500" IsDirectionReversed="False"
                        Style="{DynamicResource ZoomSliderStyle}" Value="100" />
            </fluent:StatusBarItem>
        </fluent:StatusBar>
    </Grid>

</fluent:RibbonWindow>